package com.wing.res.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * 质检模板
 * @version 1.1.0
 * @Author hz
 * @Date 2024-09-23 21:22
 **/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("res_product_quality_template")
public class ResProductQualityTemplate {


    /**
     * ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(type = IdType.AUTO)
    public Long id;

    /**
     * 版本号
     */
    @Version
    @JsonIgnore
    protected Long version;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    protected LocalDateTime createTime;

    /**
     * 创建者ID
     */
    private Long creator;

    /**
     * 创建者名称
     */
    private String creatorName;

    /**
     * 修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonIgnore
    protected LocalDateTime updateTime;

    /**
     * 修改者
     */
    protected Long modifier;
    /**
     * 修改者名称
     */
    private String modifierName;

    /**
     * 是否已删除
     */
    protected Boolean isDeleted;

    /**
     * 备注
     */
    protected String remark;

    private Long departmentId;
    /**
     * 物料类型
     */
    private Long materialTypeId;

    @TableField(exist = false)
    private String materialTypeName;
    /**
     * 名称
     */
    private String name;
    /**
     * 部门
     */
    private Long postId;
    /**
     * 性质
     */
    private Long productNatureId;

    @TableField(exist = false)
    private String productNatureName;
    /**
     * 质检分类
     */
    private Long qualityTestingCategoryId;

    @TableField(exist = false)
    private String qualityTestingCategoryName;
    /**
     * 质检类型
     */
    private Long qualityTestingTypeId;

    @TableField(exist = false)
    private String qualityTestingTypeName;


}
